// import com.alibaba.druid.sql.ast.SQLExpr;
// import com.alibaba.druid.sql.ast.SQLLimit;
// import com.alibaba.druid.sql.dialect.mysql.visitor.MySqlASTVisitor;

// import java.util.ArrayList;
// import java.util.List;

#include "MySqlShowProfileStatement.h"
#include "../../../../ast/SQLExpr.h"
#include "../../../../ast/SQLLimit.h"
#include "../../visitor/MySqlASTVisitor.h"

MySqlShowProfileStatement_Type_ptr MySqlShowProfileStatement_Type::ALL = MySqlShowProfileStatement_Type_ptr(new MySqlShowProfileStatement_Type(1 << 0, make_string_ptr("ALL")));
MySqlShowProfileStatement_Type_ptr MySqlShowProfileStatement_Type::BLOCK_IO = MySqlShowProfileStatement_Type_ptr(new MySqlShowProfileStatement_Type(1 << 0, make_string_ptr("BLOCK IO")));
MySqlShowProfileStatement_Type_ptr MySqlShowProfileStatement_Type::CONTEXT_SWITCHES = MySqlShowProfileStatement_Type_ptr(new MySqlShowProfileStatement_Type(1 << 0, make_string_ptr("CONTEXT SWITCHES")));
MySqlShowProfileStatement_Type_ptr MySqlShowProfileStatement_Type::CPU = MySqlShowProfileStatement_Type_ptr(new MySqlShowProfileStatement_Type(1 << 0, make_string_ptr("CPU")));
MySqlShowProfileStatement_Type_ptr MySqlShowProfileStatement_Type::IPC = MySqlShowProfileStatement_Type_ptr(new MySqlShowProfileStatement_Type(1 << 0, make_string_ptr("IPC")));
MySqlShowProfileStatement_Type_ptr MySqlShowProfileStatement_Type::MEMORY = MySqlShowProfileStatement_Type_ptr(new MySqlShowProfileStatement_Type(1 << 0, make_string_ptr("MEMORY")));
MySqlShowProfileStatement_Type_ptr MySqlShowProfileStatement_Type::PAGE_FAULTS = MySqlShowProfileStatement_Type_ptr(new MySqlShowProfileStatement_Type(1 << 0, make_string_ptr("PAGE FAULTS")));
MySqlShowProfileStatement_Type_ptr MySqlShowProfileStatement_Type::SOURCE = MySqlShowProfileStatement_Type_ptr(new MySqlShowProfileStatement_Type(1 << 0, make_string_ptr("SOURCE")));
MySqlShowProfileStatement_Type_ptr MySqlShowProfileStatement_Type::SWAPS = MySqlShowProfileStatement_Type_ptr(new MySqlShowProfileStatement_Type(1 << 0, make_string_ptr("SWAPS")));

MySqlShowProfileStatement_Type::MySqlShowProfileStatement_Type(uint64_t mask, string_ptr name)
{
  this->name = name;
  this->mask = mask;
}

MySqlShowProfileStatement::MySqlShowProfileStatement()
{
  types = std::make_shared<std::list<MySqlShowProfileStatement_Type_ptr>>();
}
void MySqlShowProfileStatement::accept0(MySqlASTVisitor_ptr visitor)
{
  visitor->visit(SharedObject(MySqlShowProfileStatement));
  visitor->endVisit(SharedObject(MySqlShowProfileStatement));
}

MySqlShowProfileStatement_Type_list_ptr MySqlShowProfileStatement::getTypes()
{
  return types;
}

SQLExpr_ptr MySqlShowProfileStatement::getForQuery()
{
  return forQuery;
}

void MySqlShowProfileStatement::setForQuery(SQLExpr_ptr forQuery)
{
  this->forQuery = forQuery;
}

SQLLimit_ptr MySqlShowProfileStatement::getLimit()
{
  return limit;
}

void MySqlShowProfileStatement::setLimit(SQLLimit_ptr limit)
{
  this->limit = limit;
}
